﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    ValidateRequest="false" CodeFile="Assignments_Essay.aspx.cs" Inherits="Admin_Assignments_Essay"
    Title="Admin Page - Information Literacy Education" %>

<%@ Register TagPrefix="uc" TagName="UpdateProgress" Src="~/UserControls/UpdateProgress.ascx" %>
<%@ Register TagPrefix="uc" TagName="ModalPopupMessage" Src="~/UserControls/ModalPopupMessage.ascx" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <uc:UpdateProgress ID="updateProgress" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <uc:ModalPopupMessage ID="ModalPopupMessage" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <h1>
        Manage Essay Assignment
    </h1>
    <br />
    <asp:Button ID="btnOpenCreateEssayAssignment" runat="server" Text="Create Essay Assignment"
        Width="200" OnClick="btnOpenCreateEssayAssignment_Click" />
    &nbsp;&nbsp;&nbsp;
    <asp:Button ID="btnOpenEditEssayAssignment" runat="server" Text="Edit Essay Assignment"
        Width="200" OnClick="btnOpenEditEssayAssignment_Click" />
    <br />
    <br />
    <asp:Panel ID="PanelCreateEssayAssignment" runat="server" Visible="false">
        <h2>
            Create Essay Assignment
        </h2>
        <p style="font-style: italic; font-weight: bold;">
            <asp:Label runat="server" ID="lblCreateEssaySelectedSections" Text="Selected Sections: "
                Visible="false"></asp:Label>
        </p>
        <asp:Wizard ID="WizardCreateEssayAssignment" runat="server" DisplaySideBar="false"
            OnActiveStepChanged="WizardCreateEssayAssignment_ActiveStepChanged" Width="800"
            NavigationButtonStyle-ForeColor="Black" NavigationButtonStyle-CssClass="fancyButton"
            OnFinishButtonClick="WizardCreateEssayAssignment_FinishButtonClick">
            <WizardSteps>
                <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
                    <asp:ObjectDataSource ID="ObjectDataSourceCourses" runat="server" DeleteMethod="DeleteCourse"
                        InsertMethod="InsertCourseSection" OldValuesParameterFormatString="original_{0}"
                        SelectMethod="GetCourses" TypeName="ClassBLL" UpdateMethod="UpdateCourse">
                        <DeleteParameters>
                            <asp:Parameter Name="courseID" Type="Int32" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Title" Type="String" />
                            <asp:Parameter Name="Subtitle" Type="String" />
                            <asp:Parameter Name="Introduction" Type="String" />
                            <asp:Parameter Name="IsEnabled" Type="Boolean" />
                            <asp:Parameter Name="CourseID" Type="Int32" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="courseID" Type="Int32" />
                            <asp:Parameter Name="sectionNumber" Type="Int32" />
                            <asp:Parameter Name="useSectionInfo" Type="Boolean" />
                            <asp:Parameter Name="subtitle" Type="String" />
                            <asp:Parameter Name="introduction" Type="String" />
                            <asp:Parameter Name="classTime" Type="String" />
                            <asp:Parameter Name="isEnabled" Type="Boolean" />
                        </InsertParameters>
                    </asp:ObjectDataSource>
                    <asp:GridView ID="GridViewCourses" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="CourseID" DataSourceID="ObjectDataSourceCourses"
                        ForeColor="#333333" GridLines="None" Width="800px" EmptyDataText="<div class='GridViewNoData'>No Class has been added.<br /><a href='Class.aspx'>Add Class</a></div>"
                        OnSelectedIndexChanged="GridViewCourses_SelectedIndexChanged">
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:CommandField ShowSelectButton="True" />
                            <asp:BoundField DataField="CourseID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                                SortExpression="CourseID">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Title" HeaderText="Class Title" SortExpression="Title" />
                            <asp:BoundField DataField="Subtitle" HeaderText="Class Subtitle" SortExpression="Subtitle" />
                            <asp:CheckBoxField DataField="IsEnabled" HeaderText="Enabled?" SortExpression="IsEnabled">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:CheckBoxField>
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <br />
                    <br />
                    <asp:Panel ID="PanelCreateEssaySections" runat="server" Visible="false">
                        <strong>Sections</strong><br />
                        <table>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="chkboxCreateEssaySectionsShowDisabled" runat="server" Text="Show Disabled Sections"
                                        Font-Size="Smaller" AutoPostBack="true" OnCheckedChanged="chkboxCreateEssaySectionsShowDisabled_CheckedChanged" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div style="float: left;">
                                        <asp:ListBox ID="lstboxSections" runat="server" SelectionMode="Multiple" Width="100"
                                            EnableViewState="true">
                                            <asp:ListItem>---Sections---</asp:ListItem>
                                            <asp:ListItem>Please Select a Course First</asp:ListItem>
                                        </asp:ListBox>
                                    </div>
                                    <div style="padding-left: 10px; float: left;">
                                        Enter sections in text form. <i>e.g. 1, 4-7, 9-11, 15</i><br />
                                        <asp:TextBox ID="txtSections" runat="server" AutoPostBack="true" OnTextChanged="txtSections_TextChanged"
                                            Width="300"></asp:TextBox>
                                        <br />
                                        Essays can be assigned to multiple sections.<br />
                                        Use the Ctrl key to select multiple sections.
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <br />
                        <strong>Standards</strong>
                        <asp:RadioButtonList ID="RadioButtonListStandardID" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">Getting Started</asp:ListItem>
                            <asp:ListItem Value="2">Finding Sources</asp:ListItem>
                            <asp:ListItem Value="3">Evaluating Sources</asp:ListItem>
                            <asp:ListItem Value="4">Writing with Sources</asp:ListItem>
                        </asp:RadioButtonList>
                    </asp:Panel>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
                    <table>
                        <tr>
                            <td class="tableLeftHeader">
                                Assignment Name * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtCreateGeneralAssignmentName" runat="server" Width="400" MaxLength="100"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                Directions :
                            </td>
                            <td class="tableItem">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <FCKeditorV2:FCKeditor ID="txtCreateGeneralDirections" runat="server" ToolbarSet="ILE_Admin"
                                    BasePath="~/fckeditor/" Height="300px" Width="550px" HtmlEncodeOutput="false" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                Start Date * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtGeneralStartDate" runat="server" MaxLength="1" Style="text-align: justify"
                                    ValidationGroup="EssayGeneral" />
                                <asp:ImageButton ID="imgbtnGeneralStartDate" runat="server" ImageUrl="~/Images/calendarIcon.png"
                                    CausesValidation="False" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtGeneralStartDate"
                                    Mask="99/99/9999" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus"
                                    OnInvalidCssClass="MaskedEditError" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"
                                    ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1"
                                    ControlToValidate="txtGeneralStartDate" EmptyValueMessage="Start Date is required"
                                    InvalidValueMessage="Start Date is invalid" Display="Dynamic" TooltipMessage="Input a start date"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayGeneral" />
                                <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtGeneralStartDate"
                                    PopupButtonID="imgbtnGeneralStartDate" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                                    ControlToValidate="txtGeneralStartDate" Display="Dynamic" ValidationGroup="EssayGeneral" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                Start Time * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtGeneralStartDateTime" runat="server" Width="60px" Text="06:00 AM"
                                    ValidationGroup="EssayGeneral" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtGeneralStartDateTime"
                                    Mask="99:99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                                    MaskType="Time" AcceptAMPM="True" ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator3" runat="server" ControlExtender="MaskedEditExtender3"
                                    ControlToValidate="txtGeneralStartDateTime" IsValidEmpty="False" EmptyValueMessage="Time is required"
                                    InvalidValueMessage="Time is invalid" Display="Dynamic" TooltipMessage="Input a time"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayGeneral" />
                                <span style="font-size: smaller; font-style: italic;">Type 'P' to make it PM and 'A'
                                    to make it AM.</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                End Date * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtGeneralEndDate" runat="server" MaxLength="1" Style="text-align: justify"
                                    ValidationGroup="EssayGeneral" />
                                <asp:ImageButton ID="imgbtnGeneralEndDate" runat="server" ImageUrl="~/Images/calendarIcon.png"
                                    CausesValidation="False" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtGeneralEndDate"
                                    Mask="99/99/9999" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus"
                                    OnInvalidCssClass="MaskedEditError" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"
                                    ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MaskedEditExtender2"
                                    ControlToValidate="txtGeneralEndDate" EmptyValueMessage="End Date is required"
                                    InvalidValueMessage="End Date is invalid" Display="Dynamic" TooltipMessage="Input a End date"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayGeneral" />
                                <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtGeneralEndDate"
                                    PopupButtonID="imgbtnGeneralEndDate" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                                    ControlToValidate="txtGeneralEndDate" Display="Dynamic" ValidationGroup="EssayGeneral" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                End Time * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtGeneralEndDateTime" runat="server" Width="60px" Text="11:59 PM"
                                    ValidationGroup="EssayGeneral" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="txtGeneralEndDateTime"
                                    Mask="99:99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                                    MaskType="Time" AcceptAMPM="True" ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator4" runat="server" ControlExtender="MaskedEditExtender4"
                                    ControlToValidate="txtGeneralEndDateTime" IsValidEmpty="False" EmptyValueMessage="Time is required"
                                    InvalidValueMessage="Time is invalid" Display="Dynamic" TooltipMessage="Input a time"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayGeneral" />
                                <span style="font-size: smaller; font-style: italic;">Use '11:59 PM' instead of 12:00
                                    AM for Midnight.</span>
                            </td>
                        </tr>
                        <tr style="display: none;">
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                Send Notification Email :
                            </td>
                            <td class="tableItem">
                                <asp:CheckBox ID="chkboxGeneralSendNotificationEmail" runat="server" AutoPostBack="true"
                                    OnCheckedChanged="chkboxGeneralSendNotificationEmail_CheckedChanged" />
                            </td>
                        </tr>
                        <asp:Panel ID="PanelGeneralSendNotificationEmailOption" runat="server" Visible="false">
                            <tr>
                                <td colspan="2" style="padding-left: 20px;">
                                    <table>
                                        <tr>
                                            <td class="tableLeftHeader">
                                                When Essay Starts :
                                            </td>
                                            <td class="tableItem">
                                                <asp:CheckBox ID="chkboxGeneralSendNotificationEmailEssayStart" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tableLeftHeader">
                                                When Essay Ends :
                                            </td>
                                            <td class="tableItem">
                                                <asp:CheckBox ID="chkboxGeneralSendNotificationEmailEssayEnd" runat="server" />
                                                &nbsp;&nbsp;
                                                <asp:TextBox ID="txtGeneralSendNotificationEmailEssayEndHours" runat="server" MaxLength="2"
                                                    Width="30" Text="24" />
                                                hours before.
                                                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
                                                    FilterMode="ValidChars" FilterType="Numbers" TargetControlID="txtGeneralSendNotificationEmailEssayEndHours" />
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                                    ControlToValidate="txtGeneralSendNotificationEmailEssayEndHours" ValidationGroup="EssayGeneral" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </asp:Panel>
                    </table>
                </asp:WizardStep>
            </WizardSteps>
        </asp:Wizard>
    </asp:Panel>
    <asp:Panel ID="PanelEditEssayAssignment" runat="server" Visible="false">
        <h2>
            Edit Essay Assignment
        </h2>
        <p style="font-style: italic; font-weight: bold;">
            <asp:Label runat="server" ID="lblEditEssaySelectedSections" Text="Selected Sections: "
                Visible="false"></asp:Label>
        </p>
        <asp:Wizard ID="WizardEditEssayAssignment" runat="server" DisplaySideBar="false"
            OnActiveStepChanged="WizardEditEssayAssignment_ActiveStepChanged" Width="800"
            NavigationButtonStyle-ForeColor="Black" NavigationButtonStyle-CssClass="fancyButton"
            OnFinishButtonClick="WizardEditEssayAssignment_FinishButtonClick">
            <WizardSteps>
                <asp:WizardStep ID="WizardStep3" runat="server" Title="Step 1">
                    <asp:ObjectDataSource ID="ObjectDataSourceEssayAssignments" runat="server" OldValuesParameterFormatString="original_{0}"
                        SelectMethod="GetAssignmentsByType" TypeName="AssignmentsBLL">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="Essay" Name="Type" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                    <asp:GridView ID="GridViewEssayAssignments" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="AssignmentID" DataSourceID="ObjectDataSourceEssayAssignments"
                        ForeColor="#333333" GridLines="None" Width="800px" EmptyDataText="<div class='GridViewNoData'>No Essay Assignment has been added.<br /><a href='Assignments_Essay.aspx?Mode=Create'>Add Essay Assignment</a></div>"
                        OnSelectedIndexChanged="GridViewEssayAssignments_SelectedIndexChanged" OnLoad="GridViewEssayAssignments_Load">
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:CommandField ShowSelectButton="True" />
                            <asp:BoundField DataField="AssignmentID" HeaderText="ID" SortExpression="AssignmentID"
                                InsertVisible="False" ReadOnly="True">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="AssignmentTitle" HeaderText="Assignment Title" SortExpression="AssignmentTitle">
                            </asp:BoundField>
                            <asp:BoundField DataField="StartDateTime" HeaderText="Start Time" SortExpression="StartDateTime">
                                <HeaderStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="EndDateTime" HeaderText="End Time" SortExpression="EndDateTime">
                                <HeaderStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <br />
                    <br />
                    <asp:Panel ID="PanelEditEssaySections" runat="server" Visible="false">
                        <strong>Class</strong><br />
                        <div style="padding-left: 10px;">
                            This essay is assgined to <b>
                                <asp:Label ID="lblEditClass" runat="server" /></b>
                        </div>
                        <br />
                        <strong>Sections</strong><br />
                        <table>
                            <tr>
                                <td>
                                    <div style="float: left;">
                                        <asp:ListBox ID="lstboxEditSections" runat="server" SelectionMode="Multiple" Width="100"
                                            EnableViewState="true">
                                            <asp:ListItem>---Sections---</asp:ListItem>
                                            <asp:ListItem>Please Select a Course First</asp:ListItem>
                                        </asp:ListBox>
                                    </div>
                                    <div style="padding-left: 10px; float: left;">
                                        Enter sections in text form. <i>e.g. 1, 4-7, 9-11, 15</i><br />
                                        <asp:TextBox ID="txtEditSections" runat="server" AutoPostBack="true" OnTextChanged="txtEditSections_TextChanged"
                                            Width="300"></asp:TextBox>
                                        <br />
                                        Essays can be assigned to multiple sections.<br />
                                        Use the Ctrl key to select multiple sections.
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <br />
                        <strong>Standards</strong>
                        <asp:RadioButtonList ID="RadioButtonListEditStandardID" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">Getting Started</asp:ListItem>
                            <asp:ListItem Value="2">Finding Sources</asp:ListItem>
                            <asp:ListItem Value="3">Evaluating Sources</asp:ListItem>
                            <asp:ListItem Value="4">Writing with Sources</asp:ListItem>
                        </asp:RadioButtonList>
                    </asp:Panel>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStep4" runat="server" Title="Step 2">
                    <table>
                        <tr>
                            <td class="tableLeftHeader">
                                Assignment Name * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtEditGeneralAssignmentName" runat="server" Width="400" MaxLength="100" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                Directions :
                            </td>
                            <td class="tableItem">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <FCKeditorV2:FCKeditor ID="txtEditGeneralDirections" runat="server" ToolbarSet="ILE_Admin"
                                    BasePath="~/fckeditor/" Height="300px" Width="600px" HtmlEncodeOutput="false" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                Start Date * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtEditGeneralStartDate" runat="server" MaxLength="1" Style="text-align: justify"
                                    ValidationGroup="EssayEditGeneral" />
                                <asp:ImageButton ID="imgbtnEditGeneralStartDate" runat="server" ImageUrl="~/Images/calendarIcon.png"
                                    CausesValidation="False" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="txtEditGeneralStartDate"
                                    Mask="99/99/9999" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus"
                                    OnInvalidCssClass="MaskedEditError" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"
                                    ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator5" runat="server" ControlExtender="MaskedEditExtender5"
                                    ControlToValidate="txtEditGeneralStartDate" EmptyValueMessage="Start Date is required"
                                    InvalidValueMessage="Start Date is invalid" Display="Dynamic" TooltipMessage="Input a start date"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayEditGeneral" />
                                <ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtEditGeneralStartDate"
                                    PopupButtonID="imgbtnEditGeneralStartDate" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*"
                                    ControlToValidate="txtEditGeneralStartDate" Display="Dynamic" ValidationGroup="EssayEditGeneral" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                Start Time * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtEditGeneralStartDateTime" runat="server" Width="60px" Text="06:00 AM"
                                    ValidationGroup="EssayEditGeneral" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender6" runat="server" TargetControlID="txtEditGeneralStartDateTime"
                                    Mask="99:99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                                    MaskType="Time" AcceptAMPM="True" ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator6" runat="server" ControlExtender="MaskedEditExtender6"
                                    ControlToValidate="txtEditGeneralStartDateTime" IsValidEmpty="False" EmptyValueMessage="Time is required"
                                    InvalidValueMessage="Time is invalid" Display="Dynamic" TooltipMessage="Input a time"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayEditGeneral" />
                                <span style="font-size: smaller; font-style: italic;">Type 'P' to make it PM and 'A'
                                    to make it AM.</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                End Date * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtEditGeneralEndDate" runat="server" MaxLength="1" Style="text-align: justify"
                                    ValidationGroup="EssayEditGeneral" />
                                <asp:ImageButton ID="imgbtnEditGeneralEndDate" runat="server" ImageUrl="~/Images/calendarIcon.png"
                                    CausesValidation="False" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender7" runat="server" TargetControlID="txtEditGeneralEndDate"
                                    Mask="99/99/9999" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus"
                                    OnInvalidCssClass="MaskedEditError" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"
                                    ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator7" runat="server" ControlExtender="MaskedEditExtender7"
                                    ControlToValidate="txtEditGeneralEndDate" EmptyValueMessage="End Date is required"
                                    InvalidValueMessage="End Date is invalid" Display="Dynamic" TooltipMessage="Input a End date"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayEditGeneral" />
                                <ajaxToolkit:CalendarExtender ID="CalendarExtender4" runat="server" TargetControlID="txtEditGeneralEndDate"
                                    PopupButtonID="imgbtnEditGeneralEndDate" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*"
                                    ControlToValidate="txtEditGeneralEndDate" Display="Dynamic" ValidationGroup="EssayEditGeneral" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                End Time * :
                            </td>
                            <td class="tableItem">
                                <asp:TextBox ID="txtEditGeneralEndDateTime" runat="server" Width="60px" Text="11:59 PM"
                                    ValidationGroup="EssayEditGeneral" />
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender8" runat="server" TargetControlID="txtEditGeneralEndDateTime"
                                    Mask="99:99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                                    MaskType="Time" AcceptAMPM="True" ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator8" runat="server" ControlExtender="MaskedEditExtender8"
                                    ControlToValidate="txtEditGeneralEndDateTime" IsValidEmpty="False" EmptyValueMessage="Time is required"
                                    InvalidValueMessage="Time is invalid" Display="Dynamic" TooltipMessage="Input a time"
                                    EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="EssayEditGeneral" />
                                <span style="font-size: smaller; font-style: italic;">Use '11:59 PM' instead of 12:00
                                    AM for Midnight.</span>
                            </td>
                        </tr>
                        <tr style="display: none;">
                            <td class="tableLeftHeader">
                                <!-- *SteveMsg -->
                                Send Notification Email :
                            </td>
                            <td class="tableItem">
                                <asp:CheckBox ID="chkboxEditGeneralSendNotificationEmail" runat="server" AutoPostBack="true"
                                    OnCheckedChanged="chkboxEditGeneralSendNotificationEmail_CheckedChanged" />
                            </td>
                        </tr>
                        <asp:Panel ID="PanelEditGeneralSendNotificationEmailOption" runat="server" Visible="false">
                            <tr>
                                <td colspan="2" style="padding-left: 20px;">
                                    <table>
                                        <tr>
                                            <td class="tableLeftHeader">
                                                When Essay Starts :
                                            </td>
                                            <td class="tableItem">
                                                <asp:CheckBox ID="chkboxEditGeneralSendNotificationEmailEssayStart" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tableLeftHeader">
                                                When Essay Ends :
                                            </td>
                                            <td class="tableItem">
                                                <asp:CheckBox ID="chkboxEditGeneralSendNotificationEmailEssayEnd" runat="server" />
                                                &nbsp;&nbsp;
                                                <asp:TextBox ID="txtEditGeneralSendNotificationEmailEssayEndHours" runat="server"
                                                    MaxLength="2" Width="30" Text="24" />
                                                hours before.
                                                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server"
                                                    FilterMode="ValidChars" FilterType="Numbers" TargetControlID="txtEditGeneralSendNotificationEmailEssayEndHours" />
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="*"
                                                    ControlToValidate="txtEditGeneralSendNotificationEmailEssayEndHours" ValidationGroup="EssayEditGeneral" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </asp:Panel>
                    </table>
                    <br />
                    <asp:Button ID="btnEssayDelete" runat="server" Text="Delete Essay Assignment" OnClick="btnEssayDelete_Click" />
                    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText="Are you sure you want to 'delete' this essay assignment?"
                        TargetControlID="btnEssayDelete">
                    </ajaxToolkit:ConfirmButtonExtender>
                </asp:WizardStep>
            </WizardSteps>
            <NavigationButtonStyle CssClass="fancyButton" ForeColor="Black" />
        </asp:Wizard>
    </asp:Panel>
</asp:Content>
